﻿using System.Collections;
using System.Collections.Generic;
using System.Linq;

using Whoever.Patterns.Business;

using Comswing.Business.Entities;
using Comswing.Data.Repositories;

namespace Comswing.Business
{
    public class OrganizationSwingManager : Manager<OrganizationSwing>
    {
        public OrganizationSwingManager()
            : base(new OrganizationSwingRepository())
        {
        }

        public ICollection<OrganizationSwing> GetBySwing(Swing swing)
        {
            return Repository.QueryFactory.GetAllRelated().Where(e => e.SwingId == swing.Id).ToList();
        }
    }
}
